home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # --------------------------------------------------------------------------
- # Copyright 1992 by Forschungszentrum Informatik (FZI)
- #
- # You can use and distribute this software under the terms of the licence
- # you should have received along with this program.
- # If not or if you want additional information, write to
- # Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
- # D-7500 Karlsruhe 1, Germany.
- # --------------------------------------------------------------------------
- # 'sos-cgc - 27:02:91 - Dietmar Theobald'
- #
- # sos_cgc
- #
- # SOS garbage collection on container level.
- #
- # The command must be run in 'single user mode', i.e. no containers must be
- # accessible during the run.
- # Unfortunately, container files must always be writable, even if they are only
- # opened for reading.
- #
-
- used="`sos-dmp -c`"
-
- for ct in ${SOSCONTAINER?}/[0-9]*
- do
- bn=`basename $ct`
- echo "$used" | grep -s "\<$bn\>" || { echo "sos-cgc: removing $ct"
- rm $ct
- }
- done
-